import requests
import json
def geocode(key,address,city=None,batch='false',sig=None,output='json',callback=None):
    """"获取好的Api的地理编码信息"""
    url='https://restapi.amap.com/v3/geocode/geo?parameters'
    key='18ef7dd6aeefc21dade574262c00f213'
    address=address
    params={
    'key':key,
    'address':address,
    'city':city,
    'batch':batch,
    'sig':sig,
    'output':output,
    'callback':callback
    }
    response=requests.get(url,params=params)
    results=response.json()
    return results